﻿using DroidClaim.BL.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DroidClaimBL.Dto
{
    public class RegisterCustomerBlDto
    {
        public int Id { get; set; }
        public String LicensePlate { get; set; }
        public String Salt { get; set; }
        public String Name { get; set; }
        public String Surname { get; set; }
        public String Mobile { get; set; }
        public String Email { get; set; }
        public String CustImgPath { get; set; }
        public String Password { get; set; }
        public String CarImgPath { get; set; }
        public String CarBrand { get; set; }
        public String CarModel { get; set; }
        public String InsurancePackage { get; set; }
        public String Code { get; set; }

        public DroidClaim.Service.Dto.CustomerDto ToServiceDto()
        {
            DroidClaim.Service.Dto.CustomerDto svDto = new DroidClaim.Service.Dto.CustomerDto();
            svDto.LicensePlate = LicensePlate;
            svDto.Salt = Salt;
            svDto.Name = Name;
            svDto.Surname = Surname;
            svDto.Mobile = Mobile;
            svDto.Email = Email;
            svDto.CustImgPath = ServerFileHandle.CopyImageFile(CustImgPath);
            svDto.Password = Password;
            svDto.CarImgPath = ServerFileHandle.CopyImageFile(CarImgPath);
            svDto.CarBrand = CarBrand;
            svDto.CarModel = CarModel;
            svDto.InsurancePackage = InsurancePackage;
            svDto.Code = Code;

            return svDto;
        }
    }
}